package com.huawei.travel.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 页面控制，既可以跳转到后台页面，也可以跳转到前台界面
 */
@Controller
public class PageController {
    //控制后台页面
    @RequestMapping("/backstage/{page}")
    public String showPageBackstage(@PathVariable String page) {
        return "/backstage/" + page;
    }

    //跳转到前台界面
    @RequestMapping("/frontdesk/{page}")
    public String showPageFrontdesk(@PathVariable String page) {
        return "/frontdesk/" + page;
    }

    //忽略项目logo
    @RequestMapping("favicon.ico")
    @ResponseBody
    void returnNoFavicon(){}
}
